import 'package:oktoast/oktoast.dart';

class ToastManager {
  static show(String msg, {duration = 2000, position = ToastPosition.bottom}) {
    if (msg == null) {
      return;
    }

    showToast(msg,
        position: position,
        duration: Duration(milliseconds: duration), dismissOtherToast: true);
  }

  static cancelToast() {
    dismissAllToast();
  }
}
